package com.hua.operator;

public class Demo02 {
    public static void main(String[] args) {
        long a = 12312321312312L;
        int b = 123;
        short c = 10 ;
        byte d = 8 ;
        System.out.println(a+b+c+d); //有long类型，最后就为long类型
        System.out.println(b+c+d);  //int
        System.out.println(c+d);   //最后都为int类型

        float e = 0.12F;
        double f = 12.123123123213123;
        System.out.println(e+f); //最后为double类型
        System.out.println(e+a); //最后为float类型
        System.out.println(f+b); //最后为double类型
        System.out.println(f+a); //最后为double类型

    }
}
